﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BestCode.Creds.Data.MapHelper;
using BestCode.Creds.Entities;
using NHibernate.Criterion;

namespace BestCode.Creds.Data
{
    public class AttachmentDao : DaoBase<Attachment>, IAttachmentDao
    {
        public IList<Attachment> GetByFilter(string filter)
        {
            return Session.QueryOver<Attachment>().Where(p => p.FileName.IsLike(filter + "%")).List();
        }
    }
}
